# coding=utf-8
"""
Created on 2010-8-13

@author: Morning BAI
"""

from card_base import CardBase
from sgs.common.constants import cardType

class Tao(CardBase):
    name = '桃'
    def __init__(self, id, color, point):
        CardBase.__init__(self, id, color, point, cardType.BASIC)
        
    def action(self, cond, src, args):
        if src.hp == src.maxHp:
            src.addCmd('BROKE_RULE', ['你血气方刚，无需吃桃'])
            return
        src.useTao(cond, src)
        src.beTao(cond, src)
        src.removeCard(self.id)
